package br.com.joaopessoa.sicap.dao;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import br.com.joaopessoa.sicap.repository.ICRUDRepository;

@Stateless
@LocalBean
public abstract class CRUDDao<T> implements ICRUDRepository<T> {

	private static final long serialVersionUID = 6216084236679470759L;

	@PersistenceContext(unitName = ICRUDRepository.PERSISTENCE_UNIT)
	protected EntityManager em;

	private Class<T> entity;

	public CRUDDao(Class<T> entity) {
		this.entity = entity;
	}
}